<extend name="Layout:layout_edit" /><block name="body_content_block"><form action="{:AddonU('Extension/forwarding_edit_save')}" method="post">
        <table>
            <tr>
                <th>分机号：</th><td>
                <input type="text" class="easyui-textbox" name="extension" value="{$data.userName}" readonly="readonly" />
            </td></tr>
            <tr>
                <th>转移条件：</th><td>
                <select name="forwardingState">
                    <option value="">请选择</option>
                    <option value="1">无条件转移</option>
                    <option value="2">忙时转移</option>
                    <option value="3">无应答或不可用时转移</option>
                    <option value="4">退出所有转移</option>
                </select>
            </td></tr>
            <tr>
                <th>转移到分机：</th><td>
                <select name="forwardingExtension" title="请选择分机号" data-url="{:AddonU('Extension/get_extension_json','siteID='.$data['siteID'])}" data-value="{$data.forwardingExtension}"></select>
            </td></tr>
        </table>
        <input type='hidden' value='{$data.id}' name='id' />
        <input type="hidden" name="forwardingStateOld" value="{$data.forwardingState}" />
        <input type="hidden" name="forwardingExtensionOld" value="{$data.forwardingExtension}" />
    </form>
</block>
<block name="body_after_block">
    <script>
    $('select[name="forwardingState"] option[value="{$data.forwardingState}"]').attr('selected', true);
    ajax_load_options({selector:'select[name="forwardingExtension"]', def_option:'选择分机号'});
</script>
</block>